<template>
    <div id="app">
        <NavBar v-show="$route.path.indexOf('login') === -1 && $route.path !== '/index/usercenter'"></NavBar>
        <keep-alive>
            <router-view v-if="!$route.meta.keepDeath" class="main-container" />
        </keep-alive>
        <router-view v-if="$route.meta.keepDeath" class="main-container" />
    </div>
</template>

<script>
import NavBar from '@/components/NavBar';

export default {
    data() {
        return {
            viewState: false,
        };
    },
    components: {
        NavBar,
    },
};
</script>

<style lang="less">
html,
body {
    background-color: #efefef;
    height: 100vh;
    overflow: hidden;
}
#app {
    font-size: 0.28rem;
    position: relative;
    height: 100vh;
}
.main-container {
    position: fixed;
    top: 0.72rem;
    width: 100%;
    min-height: calc(100vh - 0.72rem);
}
</style>
